package com.roadmap.entities.ext;

import java.util.HashMap;
import java.util.Map;

import com.roadmap.common.RdcConst;
import com.roadmap.common.RdcResourceBundle;
import com.roadmap.entities.Comment;

public class CommentExt extends Comment {
	private static final Map<String, String> commentableEntrySet = new HashMap<String, String>();
	private String parentDesc;

	static {
		commentableEntrySet.put(RdcConst.EXEC,
				RdcResourceBundle.LOCAL_NAME_EXEUCTION);
		commentableEntrySet.put(RdcConst.GOAL,
				RdcResourceBundle.LOCAL_NAME_LIFEGOAL);
		commentableEntrySet.put(RdcConst.TASK,
				RdcResourceBundle.LOCAL_NAME_LIFETASK);
		commentableEntrySet.put(RdcConst.BLOG,
				RdcResourceBundle.LOCAL_NAME_ARTICLE);
	}

	public CommentExt(Comment comment) {
		this.copyValues(comment);
	}

	public String getParentTypeName() {
		return commentableEntrySet.get(getEntryType());
	}

	public String getParentDesc() {
		return parentDesc;
	}

	public void setParentDesc(String parentDesc) {
		this.parentDesc = parentDesc;
	}

}
